package com.itheima.bh1004;

import java.rmi.StubNotFoundException;

public class Person {
    private String name;
    private int age;

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}


class Student extends Person {
    //子类无参调父类无参
           public Student(){
               super();
           }
           //子类带参才会调父类带参
           public Student(String name,int age){
               super(name,age);
           }
}
